﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace Model
{
    public class BlogContext : DbContext
    {
        public BlogContext() : base("name=MyStrConn") { }
        public DbSet<Blog> Blogs { get; set; }
    }

    public class Blog
    {

        public int BlogId { get; set; }
        
        public string Name { get; set; }

        public string Url { get; set; }

        public string mark { get; set; }

        public int Rating { get; set; }

        public virtual List<Post> Posts { get; set; }
    }

    //public class Post
    //{
    //    public int PostId { get; set; }
    //    [MaxLength(200)]
    //    public string Title { get; set; }
    //    public string Content { get; set; }

    //    public int BlogId { get; set; }
    //    public Blog Blog { get; set; }
    //}

}
